package com.uuah.server.config.spring.parsers.specific;

import com.uuah.server.component.model.seda.SedaModel;
import com.uuah.server.config.spring.parsers.delegate.InheritDefinitionParser;
import com.uuah.server.config.spring.parsers.generic.NamedDefinitionParser;
import com.uuah.server.config.spring.parsers.generic.OrphanDefinitionParser;
import com.uuah.server.config.spring.parsers.processors.ProvideDefaultName;

public class ModelDefinitionParser extends InheritDefinitionParser {

	public ModelDefinitionParser() {
		super(makeOrphan(), new NamedDefinitionParser());
	}

	private static OrphanDefinitionParser makeOrphan() {
		OrphanDefinitionParser orphan = new OrphanDefinitionParser(
				SedaModel.class, true);
		orphan.registerPreProcessor(new ProvideDefaultName("model"));
		return orphan;
	}

}
